Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 (scatter/marimekko) apply color/size tolerance early #4327

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Dec 17, 2024

Fixes #4284 by applying color tolerance before the author's timeline filter is applied to the input table.

This is how the bug for gray scatter plots like this one happened:

  • The World regions dataset only has data for 2023
  • The chart's timelineMax is set to 2021
  • Grapher first filters the input table by [timelineMin, timelineMax], thereby dropping years 2022 and 2023 including all color values
  • Later, in the scatter plot's transformTable function, Grapher applies infinite tolerance to the color dimension, but since all colour values have been removed, the colour column remains empty

Fixed by running colour (and size) tolerance for scatter and marimekkos earlier.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@owidbot
Copy link
Contributor

owidbot commented Dec 17, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-fix-scatter-color

SVG tester:

Number of differences (default views): 5 (8a28a6) ❌
Number of differences (all views): 0 ✅

Edited: 2024-12-18 10:18:17 UTC
Execution time: 1.37 seconds

@sophiamersmann sophiamersmann marked this pull request as ready for review December 18, 2024 10:05
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find, this works well!

@sophiamersmann sophiamersmann merged commit b68c4c9 into master Dec 18, 2024
22 of 24 checks passed
@sophiamersmann sophiamersmann deleted the fix-scatter-color branch December 18, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scatterplot tolerance goes wrong when applied to the color dimension
3 participants